package common.Exceptions;

public class FrameworkError 
{
	private String location;
	private String message;
	private String stackTrace;
	private String debugDetails;
	
	public FrameworkError(String location, String message)
	{
		setLocation(location);
		setMessage(message);
	}
	
	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}

	public String getStackTrace() {
		return stackTrace;
	}

	public void setStackTrace(Throwable e) 
	{
		StringBuilder sb = new StringBuilder();
	    for (StackTraceElement element : e.getStackTrace()) {
	        sb.append(element.toString());
	        sb.append("\n");
	    }
	    
		this.stackTrace = sb.toString();
	}

	public String getDebugDetails() {
		return debugDetails;
	}

	public void setDebugDetails(String debugDetails) {
		this.debugDetails = debugDetails;
	}
}
